package com.zhike.service.reportfeedback.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhike.common.model.Feedback;
import com.zhike.mapper.reportfeedback.ZhikeUserFeedBackMapper;
import com.zhike.service.reportfeedback.ZhikeUserFeedBackService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class ZhikeUserFeedBackServiceImpl extends ServiceImpl<ZhikeUserFeedBackMapper, Feedback> implements ZhikeUserFeedBackService {

    @Resource

    private ZhikeUserFeedBackMapper zhikeUserFeedBackMapper;

    @Override
    public Boolean addFeedback(Feedback dto) {
        dto.setCreateTime(new Date());
        return zhikeUserFeedBackMapper.insert(dto) > 0;
    }
}
